<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>linux kubesphere在线全流程搭建 | 清峰小栈</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="k8s" />
  
  
  
  
  <meta name="description" content="本文以centos，自定义项目devops-clod为例 一、Docker安装一、移除以前docker相关包12345678910systemctl stop dockersudo yum remove docker \                  docker-client \                  docker-client-latest \">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux kubesphere在线全流程搭建">
<meta property="og:url" content="http://example.com/2022/04/20/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20kubesphere%E5%9C%A8%E7%BA%BF%E5%85%A8%E6%B5%81%E7%A8%8B%E6%90%AD%E5%BB%BA/index.html">
<meta property="og:site_name" content="清峰小栈">
<meta property="og:description" content="本文以centos，自定义项目devops-clod为例 一、Docker安装一、移除以前docker相关包12345678910systemctl stop dockersudo yum remove docker \                  docker-client \                  docker-client-latest \">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090024.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090032.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090039.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090045.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090052.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090104.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090112.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090122.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090128.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090136.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090143.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090151.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090157.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090203.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090212.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090218.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090227.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090236.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090243.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090250.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090258.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090304.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090311.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090317.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090324.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090331.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090337.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090344.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090351.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090401.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090418.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090426.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090432.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090438.png">
<meta property="article:published_time" content="2022-04-20T12:38:20.174Z">
<meta property="article:modified_time" content="2023-04-28T09:20:33.376Z">
<meta property="article:author" content="清峰">
<meta property="article:tag" content="k8s">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090024.png">
  

  

  <link rel="icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  <link rel="apple-touch-icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -->
  <link href="/qingfeng-blog/css/font-awesome.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt; src:url("/qingfeng-blog/css/fonts/FuturaPTBold.otf") format("woff");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt-light; src:url("/qingfeng-blog/css/fonts/FuturaPTBook.otf") format("woff");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt-italic; src:url("/qingfeng-blog/css/fonts/FuturaPTBookOblique.otf") format("woff");font-weight:400;font-style:italic;}
}

  </style>
  
<link rel="stylesheet" href="/qingfeng-blog/css/style.css">


  
<script src="/qingfeng-blog/js/jquery-3.1.1.min.js"></script>

  
<script src="/qingfeng-blog/js/bootstrap.js"></script>


  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/qingfeng-blog/css/bootstrap.css" >

  
    
<link rel="stylesheet" href="/qingfeng-blog/css/dialog.css">

  

  

  
    <link rel="stylesheet" href="/qingfeng-blog/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/qingfeng-blog/css/vdonate.css" >
  

<meta name="generator" content="Hexo 6.3.0"></head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="155px" height="90px" alt="Hike News" src="/qingfeng-blog/css/images/mylogo-2.png">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/tags">标签</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="Type something..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/qingfeng-blog/',
        CONTENT_URL: '/qingfeng-blog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/qingfeng-blog/js/insight.js"></script>


</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-运维安装/Linux kubesphere在线全流程搭建" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
<div id="container">
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Linux kubesphere在线全流程搭建
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/qingfeng-blog/2022/04/20/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20kubesphere%E5%9C%A8%E7%BA%BF%E5%85%A8%E6%B5%81%E7%A8%8B%E6%90%AD%E5%BB%BA/" class="article-date">
	  <time datetime="2022-04-20T12:38:20.174Z" itemprop="datePublished">2022-04-20</time>
	</a>

      
    <a class="article-category-link" href="/qingfeng-blog/categories/Docker/">Docker</a>

      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		PV:<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

      

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <p><strong>本文以centos，自定义项目devops-clod为例</strong></p>
<h1 id="一、Docker安装"><a href="#一、Docker安装" class="headerlink" title="一、Docker安装"></a>一、Docker安装</h1><h2 id="一、移除以前docker相关包"><a href="#一、移除以前docker相关包" class="headerlink" title="一、移除以前docker相关包"></a>一、移除以前docker相关包</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">systemctl stop docker</span><br><span class="line"></span><br><span class="line">sudo yum remove docker \</span><br><span class="line">                  docker-client \</span><br><span class="line">                  docker-client-latest \</span><br><span class="line">                  docker-common \</span><br><span class="line">                  docker-latest \</span><br><span class="line">                  docker-latest-logrotate \</span><br><span class="line">                  docker-logrotate \</span><br><span class="line">                  docker-engine</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">或者</span><br><span class="line">systemctl status docker</span><br><span class="line"></span><br><span class="line">查询docker安装过的包</span><br><span class="line">yum list installed | grep docker</span><br><span class="line">删除安装包</span><br><span class="line">yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y</span><br><span class="line">删除镜像/容器等</span><br><span class="line">rm -rf /var/lib/docker</span><br></pre></td></tr></table></figure>

<h2 id="二、配置相关yum源"><a href="#二、配置相关yum源" class="headerlink" title="二、配置相关yum源"></a>二、配置相关yum源</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo yum install -y yum-utils</span><br><span class="line">sudo yum-config-manager \</span><br><span class="line">--add-repo \</span><br><span class="line">http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo</span><br></pre></td></tr></table></figure>

<p>在足够安全的外部防护下，可以永久关闭selinux</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">setenforce 0</span><br><span class="line">sed -i &#x27;s/SELINUX=enforcing/SELINUX=disabled/&#x27; /etc/selinux/config</span><br><span class="line">systemctl stop firewalld &amp;&amp; systemctl disable firewalld</span><br><span class="line">swapoff -a</span><br><span class="line">sed -i &#x27;s/.*swap.*/#&amp;/&#x27; /etc/fstab </span><br></pre></td></tr></table></figure>



<h2 id="三、安装docker"><a href="#三、安装docker" class="headerlink" title="三、安装docker"></a>三、安装docker</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">#以下是在安装k8s的时候使用</span><br><span class="line">yum install -y docker-ce-20.10.7 docker-ce-cli-20.10.7  containerd.io-1.4.6</span><br><span class="line">或</span><br><span class="line">#安装最新版docker</span><br><span class="line">sudo yum install -y docker-ce docker-ce-cli containerd.io</span><br></pre></td></tr></table></figure>

<h2 id="四、启动docker"><a href="#四、启动docker" class="headerlink" title="四、启动docker"></a>四、启动docker</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl enable docker --now</span><br></pre></td></tr></table></figure>

<h2 id="五、配置加速"><a href="#五、配置加速" class="headerlink" title="五、配置加速"></a>五、配置加速</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">#这里额外添加了docker的生产环境核心配置cgroup</span><br><span class="line">sudo mkdir -p /etc/docker</span><br><span class="line">#镜像仓库地址，按需修改</span><br><span class="line">sudo tee /etc/docker/daemon.json &lt;&lt;-&#x27;EOF&#x27;</span><br><span class="line">&#123;</span><br><span class="line">  &quot;registry-mirrors&quot;: [&quot;https://82m9ar63.mirror.aliyuncs.com&quot;],</span><br><span class="line">  &quot;exec-opts&quot;: [&quot;native.cgroupdriver=systemd&quot;],</span><br><span class="line">  &quot;log-driver&quot;: &quot;json-file&quot;,</span><br><span class="line">  &quot;log-opts&quot;: &#123;</span><br><span class="line">    &quot;max-size&quot;: &quot;100m&quot;</span><br><span class="line">  &#125;,</span><br><span class="line">  &quot;storage-driver&quot;: &quot;overlay2&quot;</span><br><span class="line">&#125;</span><br><span class="line">EOF</span><br><span class="line"></span><br><span class="line">#配置文件生效</span><br><span class="line">sudo systemctl daemon-reload</span><br><span class="line">#重启docker</span><br><span class="line">sudo systemctl restart docker</span><br></pre></td></tr></table></figure>



<h1 id="二、kubesphere及k8s安装"><a href="#二、kubesphere及k8s安装" class="headerlink" title="二、kubesphere及k8s安装"></a>二、kubesphere及k8s安装</h1><p>移除k8s命令（可选）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">kubeadm reset -f</span><br><span class="line">modprobe -r ipip</span><br><span class="line">rm -rf ~/.kube/</span><br><span class="line">rm -rf /etc/kubernetes/</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service.d</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service</span><br><span class="line">rm -rf /usr/bin/kube*</span><br><span class="line">rm -rf /etc/cni</span><br><span class="line">rm -rf /opt/cni</span><br><span class="line">rm -rf /var/lib/etcd</span><br><span class="line">rm -rf /var/etcd</span><br><span class="line">yum clean all</span><br><span class="line">yum remove kube*</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">卸载 KubeSphere 和 Kubernetes 意味着将其从您的机器上移除。该操作不可逆，且不会进行任何备份。请谨慎操作</span><br><span class="line">./kk delete cluster -f config-sample.yaml</span><br></pre></td></tr></table></figure>

<h2 id="一、通过KubeKey安装工具安装"><a href="#一、通过KubeKey安装工具安装" class="headerlink" title="一、通过KubeKey安装工具安装"></a>一、通过KubeKey安装工具安装</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#各个机器设置自己的名称</span><br><span class="line">hostnamectl set-hostname xxxx</span><br></pre></td></tr></table></figure>

<h2 id="二、在线安装："><a href="#二、在线安装：" class="headerlink" title="二、在线安装："></a>二、在线安装：</h2><p>主节点点安装</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">##找一个合适的目录，执行命令</span><br><span class="line">export KKZONE=cn;</span><br><span class="line">#下载kk</span><br><span class="line">curl -sfL https://get-kk.kubesphere.io | VERSION=v1.1.1 sh -</span><br><span class="line">#给定权限</span><br><span class="line">chmod +x kk</span><br><span class="line">./kk create config --with-kubernetes v1.20.4 --with-kubesphere v3.1.1 -f config-sample.yaml</span><br><span class="line">##编辑config-sample.yaml</span><br><span class="line">vim config-sample.yaml</span><br><span class="line">##给spec.hosts下把所有的要纳入集群的机器登录方式进行指定</span><br><span class="line">##给spec.roleGroups.etcd填入主节点</span><br><span class="line">##给spec.roleGroups.master填入主节点</span><br><span class="line">##给spec.roleGroups.worker填入其他所有要参与到编排部署应用的机器</span><br><span class="line">##执行：./kk create cluster -f config-sample.yaml</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">错误提示：</span><br><span class="line">1、安装前可提前安装好所需插件</span><br><span class="line">yum install -y socat conntrack ebtables ipset</span><br><span class="line">2、一直有报错：The connection to the server localhost:8080 was refused - did you specify the right host or port?: Process exited with status 1</span><br><span class="line">可以尝试下面的命令，清除集群，重新创建集群</span><br><span class="line">./kk delete cluster -f config-sample.yaml</span><br><span class="line">3、需要安装插件master: conntrack is required.</span><br><span class="line">yum install -y conntrack</span><br><span class="line">4、ssl密钥文件在从节点不存在</span><br><span class="line">ERRO[14:57:06 CST] Failed to exec command: sudo -E /bin/sh -c &quot;/usr/local/bin/kubectl -n kubesphere-monitoring-system create secret generic kube-etcd-client-certs --from-file=etcd-client-ca.crt=/etc/ssl/etcd/ssl/ca.pem --from-file=etcd-client.crt=/etc/ssl/etcd/ssl/node-master.pem --from-file=etcd-client.key=/etc/ssl/etcd/ssl/node-master-key.pem&quot; </span><br><span class="line">error: error reading /etc/ssl/etcd/ssl/node-master.pem: no such file or directory: Process exited with status 1  node=192.168.179.159</span><br><span class="line">WARN[14:57:06 CST] Task failed ...                              </span><br><span class="line">WARN[14:57:06 CST] error: interrupted by error   </span><br><span class="line">解决：</span><br><span class="line">在从节点复制member-xxx.pem改成对应的名称即可</span><br><span class="line">cp /etc/ssl/etcd/ssl/member-master-key.pem /etc/ssl/etcd/ssl/node-master-key.pem</span><br><span class="line">cp /etc/ssl/etcd/ssl/member-master.pem /etc/ssl/etcd/ssl/node-master.pem</span><br></pre></td></tr></table></figure>

<p>出现访问地址和用户名密码及安装成功</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090024.png" alt="image-20220421150627306"></p>
<h1 id="三、流水线搭建"><a href="#三、流水线搭建" class="headerlink" title="三、流水线搭建"></a>三、流水线搭建</h1><p>devops流水线默认是关闭的，需要开启devops流水线</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090032.png" alt="image-20220421151322852"></p>
<blockquote>
<p>遇到相关容器阻塞导致devops迟迟无法安装，在kubesphere上删除对应阻塞的容器重新安装</p>
</blockquote>
<h2 id="一、前期准备"><a href="#一、前期准备" class="headerlink" title="一、前期准备"></a>一、前期准备</h2><p>项目所需中间件</p>
<p><strong>nacos，mysql，redis，xxl-job</strong></p>
<h4 id="1、创建企业空间"><a href="#1、创建企业空间" class="headerlink" title="1、创建企业空间"></a>1、创建企业空间</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090039.png" alt="image-20220420212119330"></p>
<h4 id="2、创建项目管理"><a href="#2、创建项目管理" class="headerlink" title="2、创建项目管理"></a>2、创建项目管理</h4><blockquote>
<p>KubeSphere 中的项目对应的是 Kubernetes 的 namespace</p>
</blockquote>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090045.png" alt="image-20220420212159720"></p>
<h4 id="3、项目管理中配置镜像仓库密钥"><a href="#3、项目管理中配置镜像仓库密钥" class="headerlink" title="3、项目管理中配置镜像仓库密钥"></a>3、项目管理中配置镜像仓库密钥</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090052.png" alt="image-20220420212425461"></p>
<h4 id="4、安装好相关环境"><a href="#4、安装好相关环境" class="headerlink" title="4、安装好相关环境"></a>4、安装好相关环境</h4><p>需要用到的容器</p>
<p>1、nacos</p>
<p>2、xxl-job</p>
<p>3、redis</p>
<p>4、mysql（外部安装）</p>
<h3 id="1、nacos部署"><a href="#1、nacos部署" class="headerlink" title="1、nacos部署"></a>1、nacos部署</h3><h4 id="1）相关数据库配置"><a href="#1）相关数据库配置" class="headerlink" title="1）相关数据库配置"></a>1）相关数据库配置</h4><p>1、创建nacos需连接的数据库</p>
<p>2、执行nacos初始化sql</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br></pre></td><td class="code"><pre><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = config_info   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `config_info` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT &#x27;id&#x27;,</span><br><span class="line">  `data_id` varchar(255) NOT NULL COMMENT &#x27;data_id&#x27;,</span><br><span class="line">  `group_id` varchar(255) DEFAULT NULL,</span><br><span class="line">  `content` longtext NOT NULL COMMENT &#x27;content&#x27;,</span><br><span class="line">  `md5` varchar(32) DEFAULT NULL COMMENT &#x27;md5&#x27;,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  `src_user` text COMMENT &#x27;source user&#x27;,</span><br><span class="line">  `src_ip` varchar(20) DEFAULT NULL COMMENT &#x27;source ip&#x27;,</span><br><span class="line">  `app_name` varchar(128) DEFAULT NULL,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;租户字段&#x27;,</span><br><span class="line">  `c_desc` varchar(256) DEFAULT NULL,</span><br><span class="line">  `c_use` varchar(64) DEFAULT NULL,</span><br><span class="line">  `effect` varchar(64) DEFAULT NULL,</span><br><span class="line">  `type` varchar(64) DEFAULT NULL,</span><br><span class="line">  `c_schema` text,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;config_info&#x27;;</span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = config_info_aggr   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `config_info_aggr` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT &#x27;id&#x27;,</span><br><span class="line">  `data_id` varchar(255) NOT NULL COMMENT &#x27;data_id&#x27;,</span><br><span class="line">  `group_id` varchar(255) NOT NULL COMMENT &#x27;group_id&#x27;,</span><br><span class="line">  `datum_id` varchar(255) NOT NULL COMMENT &#x27;datum_id&#x27;,</span><br><span class="line">  `content` longtext NOT NULL COMMENT &#x27;内容&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  `app_name` varchar(128) DEFAULT NULL,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;租户字段&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;增加租户字段&#x27;;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = config_info_beta   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `config_info_beta` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT &#x27;id&#x27;,</span><br><span class="line">  `data_id` varchar(255) NOT NULL COMMENT &#x27;data_id&#x27;,</span><br><span class="line">  `group_id` varchar(128) NOT NULL COMMENT &#x27;group_id&#x27;,</span><br><span class="line">  `app_name` varchar(128) DEFAULT NULL COMMENT &#x27;app_name&#x27;,</span><br><span class="line">  `content` longtext NOT NULL COMMENT &#x27;content&#x27;,</span><br><span class="line">  `beta_ips` varchar(1024) DEFAULT NULL COMMENT &#x27;betaIps&#x27;,</span><br><span class="line">  `md5` varchar(32) DEFAULT NULL COMMENT &#x27;md5&#x27;,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  `src_user` text COMMENT &#x27;source user&#x27;,</span><br><span class="line">  `src_ip` varchar(20) DEFAULT NULL COMMENT &#x27;source ip&#x27;,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;租户字段&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;config_info_beta&#x27;;</span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = config_info_tag   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `config_info_tag` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT &#x27;id&#x27;,</span><br><span class="line">  `data_id` varchar(255) NOT NULL COMMENT &#x27;data_id&#x27;,</span><br><span class="line">  `group_id` varchar(128) NOT NULL COMMENT &#x27;group_id&#x27;,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;tenant_id&#x27;,</span><br><span class="line">  `tag_id` varchar(128) NOT NULL COMMENT &#x27;tag_id&#x27;,</span><br><span class="line">  `app_name` varchar(128) DEFAULT NULL COMMENT &#x27;app_name&#x27;,</span><br><span class="line">  `content` longtext NOT NULL COMMENT &#x27;content&#x27;,</span><br><span class="line">  `md5` varchar(32) DEFAULT NULL COMMENT &#x27;md5&#x27;,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  `src_user` text COMMENT &#x27;source user&#x27;,</span><br><span class="line">  `src_ip` varchar(20) DEFAULT NULL COMMENT &#x27;source ip&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;config_info_tag&#x27;;</span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = config_tags_relation   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `config_tags_relation` (</span><br><span class="line">  `id` bigint(20) NOT NULL COMMENT &#x27;id&#x27;,</span><br><span class="line">  `tag_name` varchar(128) NOT NULL COMMENT &#x27;tag_name&#x27;,</span><br><span class="line">  `tag_type` varchar(64) DEFAULT NULL COMMENT &#x27;tag_type&#x27;,</span><br><span class="line">  `data_id` varchar(255) NOT NULL COMMENT &#x27;data_id&#x27;,</span><br><span class="line">  `group_id` varchar(128) NOT NULL COMMENT &#x27;group_id&#x27;,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;tenant_id&#x27;,</span><br><span class="line">  `nid` bigint(20) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  PRIMARY KEY (`nid`),</span><br><span class="line">  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),</span><br><span class="line">  KEY `idx_tenant_id` (`tenant_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;config_tag_relation&#x27;;</span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = group_capacity   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `group_capacity` (</span><br><span class="line">  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT &#x27;主键ID&#x27;,</span><br><span class="line">  `group_id` varchar(128) NOT NULL DEFAULT &#x27;&#x27; COMMENT &#x27;Group ID，空字符表示整个集群&#x27;,</span><br><span class="line">  `quota` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;配额，0表示使用默认值&#x27;,</span><br><span class="line">  `usage` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;使用量&#x27;,</span><br><span class="line">  `max_size` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;单个配置大小上限，单位为字节，0表示使用默认值&#x27;,</span><br><span class="line">  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;聚合子配置最大个数，，0表示使用默认值&#x27;,</span><br><span class="line">  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值&#x27;,</span><br><span class="line">  `max_history_count` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;最大变更历史数量&#x27;,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_group_id` (`group_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;集群、各Group容量信息表&#x27;;</span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = his_config_info   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `his_config_info` (</span><br><span class="line">  `id` bigint(64) unsigned NOT NULL,</span><br><span class="line">  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `data_id` varchar(255) NOT NULL,</span><br><span class="line">  `group_id` varchar(128) NOT NULL,</span><br><span class="line">  `app_name` varchar(128) DEFAULT NULL COMMENT &#x27;app_name&#x27;,</span><br><span class="line">  `content` longtext NOT NULL,</span><br><span class="line">  `md5` varchar(32) DEFAULT NULL,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27;,</span><br><span class="line">  `src_user` text,</span><br><span class="line">  `src_ip` varchar(20) DEFAULT NULL,</span><br><span class="line">  `op_type` char(10) DEFAULT NULL,</span><br><span class="line">  `tenant_id` varchar(128) DEFAULT &#x27;&#x27; COMMENT &#x27;租户字段&#x27;,</span><br><span class="line">  PRIMARY KEY (`nid`),</span><br><span class="line">  KEY `idx_gmt_create` (`gmt_create`),</span><br><span class="line">  KEY `idx_gmt_modified` (`gmt_modified`),</span><br><span class="line">  KEY `idx_did` (`data_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;多租户改造&#x27;;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/******************************************/</span><br><span class="line">/*   数据库全名 = nacos_config   */</span><br><span class="line">/*   表名称 = tenant_capacity   */</span><br><span class="line">/******************************************/</span><br><span class="line">CREATE TABLE `tenant_capacity` (</span><br><span class="line">  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT &#x27;主键ID&#x27;,</span><br><span class="line">  `tenant_id` varchar(128) NOT NULL DEFAULT &#x27;&#x27; COMMENT &#x27;Tenant ID&#x27;,</span><br><span class="line">  `quota` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;配额，0表示使用默认值&#x27;,</span><br><span class="line">  `usage` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;使用量&#x27;,</span><br><span class="line">  `max_size` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;单个配置大小上限，单位为字节，0表示使用默认值&#x27;,</span><br><span class="line">  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;聚合子配置最大个数&#x27;,</span><br><span class="line">  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值&#x27;,</span><br><span class="line">  `max_history_count` int(10) unsigned NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;最大变更历史数量&#x27;,</span><br><span class="line">  `gmt_create` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` datetime NOT NULL DEFAULT &#x27;2010-05-05 00:00:00&#x27; COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_tenant_id` (`tenant_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;租户容量信息表&#x27;;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">CREATE TABLE `tenant_info` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT &#x27;id&#x27;,</span><br><span class="line">  `kp` varchar(128) NOT NULL COMMENT &#x27;kp&#x27;,</span><br><span class="line">  `tenant_id` varchar(128) default &#x27;&#x27; COMMENT &#x27;tenant_id&#x27;,</span><br><span class="line">  `tenant_name` varchar(128) default &#x27;&#x27; COMMENT &#x27;tenant_name&#x27;,</span><br><span class="line">  `tenant_desc` varchar(256) DEFAULT NULL COMMENT &#x27;tenant_desc&#x27;,</span><br><span class="line">  `create_source` varchar(32) DEFAULT NULL COMMENT &#x27;create_source&#x27;,</span><br><span class="line">  `gmt_create` bigint(20) NOT NULL COMMENT &#x27;创建时间&#x27;,</span><br><span class="line">  `gmt_modified` bigint(20) NOT NULL COMMENT &#x27;修改时间&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),</span><br><span class="line">  KEY `idx_tenant_id` (`tenant_id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=&#x27;tenant_info&#x27;;</span><br><span class="line"></span><br><span class="line">CREATE TABLE users (</span><br><span class="line">	username varchar(50) NOT NULL PRIMARY KEY,</span><br><span class="line">	password varchar(500) NOT NULL,</span><br><span class="line">	enabled boolean NOT NULL</span><br><span class="line">);</span><br><span class="line"></span><br><span class="line">CREATE TABLE roles (</span><br><span class="line">	username varchar(50) NOT NULL,</span><br><span class="line">	role varchar(50) NOT NULL,</span><br><span class="line">	constraint uk_username_role UNIQUE (username,role)</span><br><span class="line">);</span><br><span class="line"></span><br><span class="line">CREATE TABLE permissions (</span><br><span class="line">    role varchar(50) NOT NULL,</span><br><span class="line">    resource varchar(512) NOT NULL,</span><br><span class="line">    action varchar(8) NOT NULL,</span><br><span class="line">    constraint uk_role_permission UNIQUE (role,resource,action)</span><br><span class="line">);</span><br><span class="line"></span><br><span class="line">INSERT INTO users (username, password, enabled) VALUES (&#x27;nacos&#x27;, &#x27;$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu&#x27;, TRUE);</span><br><span class="line"></span><br><span class="line">INSERT INTO roles (username, role) VALUES (&#x27;nacos&#x27;, &#x27;ROLE_ADMIN&#x27;);</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h4 id="2、自制应用创建nacos（yml形式）"><a href="#2、自制应用创建nacos（yml形式）" class="headerlink" title="2、自制应用创建nacos（yml形式）"></a>2、自制应用创建nacos（yml形式）</h4><blockquote>
<p>注意修改 工作空间namespace，镜像源地址image，数据源地址</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br></pre></td><td class="code"><pre><span class="line">apiVersion: app.k8s.io/v1beta1</span><br><span class="line">kind: Application</span><br><span class="line">metadata:</span><br><span class="line">  name: nacos</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: nacos</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: nacos</span><br><span class="line">  addOwnerRef: true</span><br><span class="line">  componentKinds:</span><br><span class="line">    - group: &#x27;&#x27;</span><br><span class="line">      kind: Service</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: Deployment</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: StatefulSet</span><br><span class="line">    - group: extensions</span><br><span class="line">      kind: Ingress</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: Strategy</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: ServicePolicy</span><br><span class="line">---</span><br><span class="line">apiVersion: extensions/v1beta1</span><br><span class="line">kind: Ingress</span><br><span class="line">metadata:</span><br><span class="line">  namespace: devops-cloud</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: nacos</span><br><span class="line">  name: nacos-ingress-i52okm</span><br><span class="line">spec:</span><br><span class="line">  rules: []</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: nacos</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: nacos</span><br><span class="line">  name: nacos-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: nacos</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: nacos</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: nacos</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: nacos</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-iy6dn0</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.179.188:8080/common/nacos-server:2.0.2&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-8848</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 8848</span><br><span class="line">              servicePort: 8848</span><br><span class="line">            - name: tcp-9848</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 9848</span><br><span class="line">              servicePort: 9848</span><br><span class="line">          env:</span><br><span class="line">            - name: MYSQL_SERVICE_DB_NAME</span><br><span class="line">              value: nacos-dev2</span><br><span class="line">            - name: MYSQL_SERVICE_DB_PARAM</span><br><span class="line">              value: &gt;-</span><br><span class="line">                useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;useSSL=false&amp;zeroDateTimeBehavior=convertToNull&amp;serverTimezone=Asia/Shanghai</span><br><span class="line">            - name: MYSQL_SERVICE_HOST</span><br><span class="line">              value: 192.168.179.215</span><br><span class="line">            - name: MYSQL_SERVICE_PASSWORD</span><br><span class="line">              value: 数据库密码</span><br><span class="line">            - name: MYSQL_SERVICE_PORT</span><br><span class="line">              value: &#x27;3306&#x27;</span><br><span class="line">            - name: MYSQL_SERVICE_USER</span><br><span class="line">              value: root</span><br><span class="line">            - name: SPRING_DATASOURCE_PLATFORM</span><br><span class="line">              value: mysql</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: nacos</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /home/nacos/data</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: nacos</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: nacos</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: nacos</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: nacos</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: nacos</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: nacos</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: nacos</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: nacos</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-8848</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 8848</span><br><span class="line">      targetPort: 8848</span><br><span class="line">    - name: tcp-9848</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 9848</span><br><span class="line">      targetPort: 9848</span><br><span class="line">  type: NodePort</span><br></pre></td></tr></table></figure>

<p>3、容器组中查看日志启动成功</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090104.png" alt="image-20220420213711495"></p>
<p>4、服务中可查看Dns（应用名称+命名空间）</p>
<p>dns用于集群内应用访问使用（连接nacos通过该dns连接）</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090112.png" alt="image-20220420213813756"></p>
<h3 id="二、xxl-job部署"><a href="#二、xxl-job部署" class="headerlink" title="二、xxl-job部署"></a>二、xxl-job部署</h3><p><a target="_blank" rel="noopener" href="https://gitee.com/xuxueli0323/xxl-job">https://gitee.com/xuxueli0323/xxl-job</a></p>
<h4 id="1）新建xxl-job数据库"><a href="#1）新建xxl-job数据库" class="headerlink" title="1）新建xxl-job数据库"></a>1）新建xxl-job数据库</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br></pre></td><td class="code"><pre><span class="line">#</span><br><span class="line"># XXL-JOB v2.3.1-SNAPSHOT</span><br><span class="line"># Copyright (c) 2015-present, xuxueli.</span><br><span class="line"></span><br><span class="line">SET NAMES utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_info` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `job_group` int(11) NOT NULL COMMENT &#x27;执行器主键ID&#x27;,</span><br><span class="line">  `job_desc` varchar(255) NOT NULL,</span><br><span class="line">  `add_time` datetime DEFAULT NULL,</span><br><span class="line">  `update_time` datetime DEFAULT NULL,</span><br><span class="line">  `author` varchar(64) DEFAULT NULL COMMENT &#x27;作者&#x27;,</span><br><span class="line">  `alarm_email` varchar(255) DEFAULT NULL COMMENT &#x27;报警邮件&#x27;,</span><br><span class="line">  `schedule_type` varchar(50) NOT NULL DEFAULT &#x27;NONE&#x27; COMMENT &#x27;调度类型&#x27;,</span><br><span class="line">  `schedule_conf` varchar(128) DEFAULT NULL COMMENT &#x27;调度配置，值含义取决于调度类型&#x27;,</span><br><span class="line">  `misfire_strategy` varchar(50) NOT NULL DEFAULT &#x27;DO_NOTHING&#x27; COMMENT &#x27;调度过期策略&#x27;,</span><br><span class="line">  `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT &#x27;执行器路由策略&#x27;,</span><br><span class="line">  `executor_handler` varchar(255) DEFAULT NULL COMMENT &#x27;执行器任务handler&#x27;,</span><br><span class="line">  `executor_param` varchar(512) DEFAULT NULL COMMENT &#x27;执行器任务参数&#x27;,</span><br><span class="line">  `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT &#x27;阻塞处理策略&#x27;,</span><br><span class="line">  `executor_timeout` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;任务执行超时时间，单位秒&#x27;,</span><br><span class="line">  `executor_fail_retry_count` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;失败重试次数&#x27;,</span><br><span class="line">  `glue_type` varchar(50) NOT NULL COMMENT &#x27;GLUE类型&#x27;,</span><br><span class="line">  `glue_source` mediumtext COMMENT &#x27;GLUE源代码&#x27;,</span><br><span class="line">  `glue_remark` varchar(128) DEFAULT NULL COMMENT &#x27;GLUE备注&#x27;,</span><br><span class="line">  `glue_updatetime` datetime DEFAULT NULL COMMENT &#x27;GLUE更新时间&#x27;,</span><br><span class="line">  `child_jobid` varchar(255) DEFAULT NULL COMMENT &#x27;子任务ID，多个逗号分隔&#x27;,</span><br><span class="line">  `trigger_status` tinyint(4) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;调度状态：0-停止，1-运行&#x27;,</span><br><span class="line">  `trigger_last_time` bigint(13) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;上次调度时间&#x27;,</span><br><span class="line">  `trigger_next_time` bigint(13) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;下次调度时间&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_log` (</span><br><span class="line">  `id` bigint(20) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `job_group` int(11) NOT NULL COMMENT &#x27;执行器主键ID&#x27;,</span><br><span class="line">  `job_id` int(11) NOT NULL COMMENT &#x27;任务，主键ID&#x27;,</span><br><span class="line">  `executor_address` varchar(255) DEFAULT NULL COMMENT &#x27;执行器地址，本次执行的地址&#x27;,</span><br><span class="line">  `executor_handler` varchar(255) DEFAULT NULL COMMENT &#x27;执行器任务handler&#x27;,</span><br><span class="line">  `executor_param` varchar(512) DEFAULT NULL COMMENT &#x27;执行器任务参数&#x27;,</span><br><span class="line">  `executor_sharding_param` varchar(20) DEFAULT NULL COMMENT &#x27;执行器任务分片参数，格式如 1/2&#x27;,</span><br><span class="line">  `executor_fail_retry_count` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;失败重试次数&#x27;,</span><br><span class="line">  `trigger_time` datetime DEFAULT NULL COMMENT &#x27;调度-时间&#x27;,</span><br><span class="line">  `trigger_code` int(11) NOT NULL COMMENT &#x27;调度-结果&#x27;,</span><br><span class="line">  `trigger_msg` text COMMENT &#x27;调度-日志&#x27;,</span><br><span class="line">  `handle_time` datetime DEFAULT NULL COMMENT &#x27;执行-时间&#x27;,</span><br><span class="line">  `handle_code` int(11) NOT NULL COMMENT &#x27;执行-状态&#x27;,</span><br><span class="line">  `handle_msg` text COMMENT &#x27;执行-日志&#x27;,</span><br><span class="line">  `alarm_status` tinyint(4) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;告警状态：0-默认、1-无需告警、2-告警成功、3-告警失败&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  KEY `I_trigger_time` (`trigger_time`),</span><br><span class="line">  KEY `I_handle_code` (`handle_code`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_log_report` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `trigger_day` datetime DEFAULT NULL COMMENT &#x27;调度-时间&#x27;,</span><br><span class="line">  `running_count` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;运行中-日志数量&#x27;,</span><br><span class="line">  `suc_count` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;执行成功-日志数量&#x27;,</span><br><span class="line">  `fail_count` int(11) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;执行失败-日志数量&#x27;,</span><br><span class="line">  `update_time` datetime DEFAULT NULL,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_logglue` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `job_id` int(11) NOT NULL COMMENT &#x27;任务，主键ID&#x27;,</span><br><span class="line">  `glue_type` varchar(50) DEFAULT NULL COMMENT &#x27;GLUE类型&#x27;,</span><br><span class="line">  `glue_source` mediumtext COMMENT &#x27;GLUE源代码&#x27;,</span><br><span class="line">  `glue_remark` varchar(128) NOT NULL COMMENT &#x27;GLUE备注&#x27;,</span><br><span class="line">  `add_time` datetime DEFAULT NULL,</span><br><span class="line">  `update_time` datetime DEFAULT NULL,</span><br><span class="line">  PRIMARY KEY (`id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_registry` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `registry_group` varchar(50) NOT NULL,</span><br><span class="line">  `registry_key` varchar(255) NOT NULL,</span><br><span class="line">  `registry_value` varchar(255) NOT NULL,</span><br><span class="line">  `update_time` datetime DEFAULT NULL,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_group` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `app_name` varchar(64) NOT NULL COMMENT &#x27;执行器AppName&#x27;,</span><br><span class="line">  `title` varchar(12) NOT NULL COMMENT &#x27;执行器名称&#x27;,</span><br><span class="line">  `address_type` tinyint(4) NOT NULL DEFAULT &#x27;0&#x27; COMMENT &#x27;执行器地址类型：0=自动注册、1=手动录入&#x27;,</span><br><span class="line">  `address_list` text COMMENT &#x27;执行器地址列表，多地址逗号分隔&#x27;,</span><br><span class="line">  `update_time` datetime DEFAULT NULL,</span><br><span class="line">  PRIMARY KEY (`id`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_user` (</span><br><span class="line">  `id` int(11) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `username` varchar(50) NOT NULL COMMENT &#x27;账号&#x27;,</span><br><span class="line">  `password` varchar(50) NOT NULL COMMENT &#x27;密码&#x27;,</span><br><span class="line">  `role` tinyint(4) NOT NULL COMMENT &#x27;角色：0-普通用户、1-管理员&#x27;,</span><br><span class="line">  `permission` varchar(255) DEFAULT NULL COMMENT &#x27;权限：执行器ID列表，多个逗号分割&#x27;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  UNIQUE KEY `i_username` (`username`) USING BTREE</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">CREATE TABLE `xxl_job_lock` (</span><br><span class="line">  `lock_name` varchar(50) NOT NULL COMMENT &#x27;锁名称&#x27;,</span><br><span class="line">  PRIMARY KEY (`lock_name`)</span><br><span class="line">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</span><br><span class="line"></span><br><span class="line">INSERT INTO `xxl_job_group`(`id`, `app_name`, `title`, `address_type`, `address_list`, `update_time`) VALUES (1, &#x27;xxl-job-executor-sample&#x27;, &#x27;示例执行器&#x27;, 0, NULL, &#x27;2018-11-03 22:21:31&#x27; );</span><br><span class="line">INSERT INTO `xxl_job_info`(`id`, `job_group`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`, `schedule_type`, `schedule_conf`, `misfire_strategy`, `executor_route_strategy`, `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`, `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`, `child_jobid`) VALUES (1, 1, &#x27;测试任务1&#x27;, &#x27;2018-11-03 22:21:31&#x27;, &#x27;2018-11-03 22:21:31&#x27;, &#x27;XXL&#x27;, &#x27;&#x27;, &#x27;CRON&#x27;, &#x27;0 0 0 * * ? *&#x27;, &#x27;DO_NOTHING&#x27;, &#x27;FIRST&#x27;, &#x27;demoJobHandler&#x27;, &#x27;&#x27;, &#x27;SERIAL_EXECUTION&#x27;, 0, 0, &#x27;BEAN&#x27;, &#x27;&#x27;, &#x27;GLUE代码初始化&#x27;, &#x27;2018-11-03 22:21:31&#x27;, &#x27;&#x27;);</span><br><span class="line">INSERT INTO `xxl_job_user`(`id`, `username`, `password`, `role`, `permission`) VALUES (1, &#x27;admin&#x27;, &#x27;e10adc3949ba59abbe56e057f20f883e&#x27;, 1, NULL);</span><br><span class="line">INSERT INTO `xxl_job_lock` ( `lock_name`) VALUES ( &#x27;schedule_lock&#x27;);</span><br><span class="line"></span><br><span class="line">commit;</span><br></pre></td></tr></table></figure>



<h4 id="2）自制应用创建xxl-job"><a href="#2）自制应用创建xxl-job" class="headerlink" title="2）自制应用创建xxl-job"></a>2）自制应用创建xxl-job</h4><blockquote>
<p>注意修改 命名空间namespace，镜像源地址images，数据库连接方式，</p>
</blockquote>
<p>yml中数据库名称要于自建应用数据库连接对应</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br></pre></td><td class="code"><pre><span class="line">apiVersion: app.k8s.io/v1beta1</span><br><span class="line">kind: Application</span><br><span class="line">metadata:</span><br><span class="line">  name: xxl-job</span><br><span class="line">  namespace: dev3</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: xxl-job</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: xxl-job</span><br><span class="line">  addOwnerRef: true</span><br><span class="line">  componentKinds:</span><br><span class="line">    - group: &#x27;&#x27;</span><br><span class="line">      kind: Service</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: Deployment</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: StatefulSet</span><br><span class="line">    - group: extensions</span><br><span class="line">      kind: Ingress</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: Strategy</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: ServicePolicy</span><br><span class="line">---</span><br><span class="line">apiVersion: extensions/v1beta1</span><br><span class="line">kind: Ingress</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev3</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: xxl-job</span><br><span class="line">  name: xxl-job-ingress-j6ldh4</span><br><span class="line">spec:</span><br><span class="line">  rules: []</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev3</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: xxl-job</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: xxl-job</span><br><span class="line">  name: xxl-job-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: xxl-job</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: xxl-job</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: xxl-job</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: xxl-job</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-7qspzi</span><br><span class="line">          imagePullPolicy: IfNotPresent</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.179.188:8080/common/xxl-job-admin&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: http-8094</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 8094</span><br><span class="line">              servicePort: 8094</span><br><span class="line">          env:</span><br><span class="line">            - name: MYSQL_SERVICE_DB_NAME</span><br><span class="line">              value: xxl-job-dev3</span><br><span class="line">            - name: MYSQL_SERVICE_HOST</span><br><span class="line">              value: 192.168.179.215</span><br><span class="line">            - name: MYSQL_SERVICE_PORT</span><br><span class="line">              value: &#x27;3306&#x27;</span><br><span class="line">            - name: MYSQL_SERVICE_PASSWORD</span><br><span class="line">              value: 数据库密码</span><br><span class="line">            - name: MYSQL_SERVICE_USER</span><br><span class="line">              value: root</span><br><span class="line">            - name: SPRING_MAIL_HOST</span><br><span class="line">              value: imap.163.com</span><br><span class="line">            - name: SPRING_MAIL_PORT</span><br><span class="line">              value: &#x27;143&#x27;</span><br><span class="line">            - name: SPRING_MAIL_USERNAME</span><br><span class="line">              value: xk_admin@163.com</span><br><span class="line">            - name: SPRING_MAIL_FROM</span><br><span class="line">              value: xk_admin@163.com</span><br><span class="line">            - name: SPRING_MAIL_PASSWORD</span><br><span class="line">              value: MDBSBUJZFYASSOUS</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev3</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: xxl-job</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: xxl-job</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: xxl-job</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: xxl-job</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: xxl-job</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: xxl-job</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: xxl-job</span><br><span class="line">  ports:</span><br><span class="line">    - name: http-8094</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 8094</span><br><span class="line">      targetPort: 8094</span><br><span class="line">  type: NodePort</span><br></pre></td></tr></table></figure>

<ul>
<li><p>查看容器组日志，启动成功</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090122.png" alt="image-20220420214945237"></p>
<ul>
<li><p>服务中查看nds</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090128.png" alt="image-20220420215058926"></p>
</li>
</ul>
</li>
</ul>
<h3 id="三、redis部署"><a href="#三、redis部署" class="headerlink" title="三、redis部署"></a>三、redis部署</h3><h4 id="1）配置中心创建配置"><a href="#1）配置中心创建配置" class="headerlink" title="1）配置中心创建配置"></a>1）配置中心创建配置</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090136.png" alt="image-20220421160057253"></p>
<h4 id="2）创建存储卷"><a href="#2）创建存储卷" class="headerlink" title="2）创建存储卷"></a>2）创建存储卷</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090143.png" alt="image-20220421154812227"></p>
<h4 id="3）创建容器"><a href="#3）创建容器" class="headerlink" title="3）创建容器"></a>3）创建容器</h4><blockquote>
<p>有状态服务不能对外暴露端口，只有无状态服务才可以；当然如果上线部署的话还是要选择有状态服务</p>
</blockquote>
<ul>
<li><p>设置启动命令</p>
<blockquote>
<p>此处启动并加载&#x2F;etc&#x2F;redis&#x2F;redis.conf的配置文件，下文中配置文件路径一致</p>
</blockquote>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090151.png" alt="image-20220421160335556"></p>
</li>
</ul>
<h4 id="4）添加存储卷"><a href="#4）添加存储卷" class="headerlink" title="4）添加存储卷"></a>4）添加存储卷</h4><p>目录为<code>/data</code></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090157.png" alt="image-20220421155236818"></p>
<h4 id="5）挂载配置文件"><a href="#5）挂载配置文件" class="headerlink" title="5）挂载配置文件"></a>5）挂载配置文件</h4><p>挂在配置文件，这里我们选择上面配置的配置文件，路径和上面一致为<code>/etc/redis/redis.conf</code>，意思就是上面启动命令是启动<code>/etc/redis/redis.conf</code>配置文件，这里将<code>redis-conf</code>中的配置信息关联给<code>/etc/redis/redis.conf</code>(这里redis.conf不写的话需要跟配置中的键保持一致)</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090203.png" alt="image-20220421160454198"></p>
<h2 id="二、项目代码配置"><a href="#二、项目代码配置" class="headerlink" title="二、项目代码配置"></a>二、项目代码配置</h2><h3 id="一、pom文件"><a href="#一、pom文件" class="headerlink" title="一、pom文件"></a>一、pom文件</h3><p>修改pom连接配置</p>
<p>1、检查nacos的dns是否一致</p>
<p>2、配置文件名称，组名是否一致</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090212.png" alt="image-20220420220429122"></p>
<p>项目采用的是nacos</p>
<blockquote>
<p>在kubesphere面板服务里查看nacos的外放访问端口，处于哪台服务器，ip+端口&#x2F;nacos访问nacos</p>
</blockquote>
<p>登录nacos添加项目配置文件(跟项目中pom所写保持一致)</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090218.png" alt="image-20220421163229765"></p>
<h3 id="二、配置Dockerfile构建构建文件（每个服务都要）"><a href="#二、配置Dockerfile构建构建文件（每个服务都要）" class="headerlink" title="二、配置Dockerfile构建构建文件（每个服务都要）"></a>二、配置Dockerfile构建构建文件（每个服务都要）</h3><blockquote>
<p>注意：每个服务端口不一致，jar包名称不一致</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">#设置镜像基础，jdk8</span><br><span class="line">FROM java:8</span><br><span class="line">#维护人员信息</span><br><span class="line">MAINTAINER hetao</span><br><span class="line">#设置镜像对外暴露端口</span><br><span class="line">EXPOSE 10014</span><br><span class="line">ENV TZ=PRC</span><br><span class="line">RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;&amp; echo $TZ &gt; /etc/timezone</span><br><span class="line">#将当前 target 目录下的 jar 放置在根目录下，命名为 app.jar，推荐使用绝对路径。</span><br><span class="line">ADD target/devops-validator.jar /devops-validator.jar</span><br><span class="line">#执行启动命令</span><br><span class="line">ENTRYPOINT java $&#123;JVM:=-Xms2048m -Xmx2048m&#125; -Djava.security.egd=file:/dev/./urandom -jar /devops-validator.jar</span><br></pre></td></tr></table></figure>

<h3 id="三、项目中流水线构建Deployment容器所需的配置文件（每个服务都要）"><a href="#三、项目中流水线构建Deployment容器所需的配置文件（每个服务都要）" class="headerlink" title="三、项目中流水线构建Deployment容器所需的配置文件（每个服务都要）"></a>三、项目中流水线构建Deployment容器所需的配置文件（每个服务都要）</h3><blockquote>
<p>每个服务配置不一样，主要修改其中的 名称name，命名空间namespace，应用名称app，镜像源地址images，端口tcp</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090227.png" alt="image-20220421163617011"></p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br></pre></td><td class="code"><pre><span class="line">kind: Deployment</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">metadata:</span><br><span class="line">  name: devops-validator-v1</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    app: devops-validator</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    version: v1</span><br><span class="line">  annotations:</span><br><span class="line">    deployment.kubernetes.io/revision: &#x27;2&#x27;</span><br><span class="line">    kubesphere.io/creator: admin</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app: devops-validator</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      version: v1</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        app: devops-validator</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        version: v1</span><br><span class="line">      annotations:</span><br><span class="line">        kubesphere.io/restartedAt: &#x27;2021-12-02T05:13:43.487Z&#x27;</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      volumes:</span><br><span class="line">        - name: host-time</span><br><span class="line">          hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-bejgi2</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-validator&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10014</span><br><span class="line">              containerPort: 10014</span><br><span class="line">              protocol: TCP</span><br><span class="line">          env:</span><br><span class="line">            - name: JVM</span><br><span class="line">              value: &#x27;-Xms256m -Xmx256m&#x27;</span><br><span class="line">          resources:</span><br><span class="line">            limits:</span><br><span class="line">              cpu: &#x27;1&#x27;</span><br><span class="line">              memory: 1000Mi</span><br><span class="line">            requests:</span><br><span class="line">              cpu: 500m</span><br><span class="line">              memory: 500Mi</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              readOnly: true</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">            - name: app</span><br><span class="line">              mountPath: /app</span><br><span class="line">          terminationMessagePath: /dev/termination-log</span><br><span class="line">          terminationMessagePolicy: File</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">      restartPolicy: Always</span><br><span class="line">      terminationGracePeriodSeconds: 30</span><br><span class="line">      dnsPolicy: ClusterFirst</span><br><span class="line">      serviceAccountName: default</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      securityContext: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      schedulerName: default-scheduler</span><br><span class="line">  strategy:</span><br><span class="line">    type: Recreate</span><br><span class="line">  revisionHistoryLimit: 10</span><br><span class="line">  progressDeadlineSeconds: 600</span><br></pre></td></tr></table></figure>

<h2 id="三、拉通流水线"><a href="#三、拉通流水线" class="headerlink" title="三、拉通流水线"></a>三、拉通流水线</h2><h3 id="一、创建流水线工程-devops-cloud-auto"><a href="#一、创建流水线工程-devops-cloud-auto" class="headerlink" title="一、创建流水线工程 devops-cloud-auto"></a>一、创建流水线工程 devops-cloud-auto</h3><h3 id="二、创建所需凭证"><a href="#二、创建所需凭证" class="headerlink" title="二、创建所需凭证"></a>二、创建所需凭证</h3><h4 id="1、新建镜像仓库凭证"><a href="#1、新建镜像仓库凭证" class="headerlink" title="1、新建镜像仓库凭证"></a>1、新建镜像仓库凭证</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090236.png" alt="image-20220420222126737"></p>
<h4 id="2、新建kubeconfig"><a href="#2、新建kubeconfig" class="headerlink" title="2、新建kubeconfig"></a>2、新建kubeconfig</h4><p>默认生成</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090243.png" alt="image-20220420222210612"></p>
<h3 id="三、创建流水线"><a href="#三、创建流水线" class="headerlink" title="三、创建流水线"></a>三、创建流水线</h3><blockquote>
<p>主要4步：</p>
<p>代码检出</p>
<p>集成测试环境构建制品</p>
<p>清理部署</p>
<p>发布测试环境</p>
<p>注意：在构建制品时项目pom文件中镜像源地址仓库名是否在harbor中有创建，没有的话，运行流水线会报错，需要自己创建仓库</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090250.png" alt="image-20220421164903217"></p>
</blockquote>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090258.png" alt="image-20220420221640323"></p>
<h4 id="1-代理环境-maven"><a href="#1-代理环境-maven" class="headerlink" title="1)代理环境 maven"></a>1)代理环境 maven</h4><h4 id="2）代码检出"><a href="#2）代码检出" class="headerlink" title="2）代码检出"></a>2）代码检出</h4><blockquote>
<p>凭证是项目代码仓库地址</p>
</blockquote>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090304.png" alt="image-20220420222438920"></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090311.png" alt="image-20220421173225644"></p>
<h4 id="3）集成测试环境制品构建"><a href="#3）集成测试环境制品构建" class="headerlink" title="3）集成测试环境制品构建"></a>3）集成测试环境制品构建</h4><p>注意环境变量需要自己在保存后的面板上，编辑jekins，添加相关配置（当然也可写死不配置在环境变量中，不建议）</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090317.png" alt="image-20220420223545289"></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090324.png" alt="image-20220420222922754"></p>
<h4 id="4）清理部署"><a href="#4）清理部署" class="headerlink" title="4）清理部署"></a>4）清理部署</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090331.png" alt="image-20220420223120319"></p>
<h4 id="5）发布测试环境"><a href="#5）发布测试环境" class="headerlink" title="5）发布测试环境"></a>5）发布测试环境</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090337.png" alt="image-20220420223342778"></p>
<h4 id="6）运行部署"><a href="#6）运行部署" class="headerlink" title="6）运行部署"></a>6）运行部署</h4><p>失败，点击活动，查看日志。分析报错</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090344.png" alt="image-20220420223815150"></p>
<p>成功，等启动完，查看服务下所有容器的的日志，是否启动完成无报错</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090351.png" alt="image-20220420224253239"></p>
<h4 id="7）（可选）使用配置文件形式构建流水线"><a href="#7）（可选）使用配置文件形式构建流水线" class="headerlink" title="7）（可选）使用配置文件形式构建流水线"></a>7）（可选）使用配置文件形式构建流水线</h4><blockquote>
<p>1、environment环境变量要改一下</p>
<p>2、编辑流水线每一个环节的凭证也改成自己定义的</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090401.png" alt="image-20220421164309958"></p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line">pipeline &#123;</span><br><span class="line">  agent &#123;</span><br><span class="line">    node &#123;</span><br><span class="line">      label &#x27;maven&#x27;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line">  stages &#123;</span><br><span class="line">    stage(&#x27;代码检出&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        git(branch: &#x27;dev-checkService-ldf&#x27;, url: &#x27;http://47.x.x.x/devops-studio/devops-cloud.git&#x27;, credentialsId: &#x27;zhao-huang&#x27;, changelog: true, poll: false)</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;集成测试环境制品构建&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        container(&#x27;maven&#x27;) &#123;</span><br><span class="line">          withCredentials([usernamePassword(credentialsId : &#x27;zhaohuanh-docker&#x27; ,passwordVariable : &#x27;DOCKER_PASSWORD&#x27; ,usernameVariable : &#x27;DOCKER_USERNAME&#x27;)]) &#123;</span><br><span class="line">            sh &#x27;echo &quot;$DOCKER_PASSWORD&quot; | docker login $REGISTRY -u &quot;$DOCKER_USERNAME&quot; --password-stdin&#x27;</span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">          sh &#x27;mvn clean package  -P dev2 -T 1C -Dmaven.test.skip=true  -Dmaven.compile.fork=true dockerfile:build dockerfile:push&#x27;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;清理部署&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        kubernetesDeploy(enableConfigSubstitution: true, deleteResource: true, kubeconfigId: &#x27;kubeconfig&#x27;, configs: &#x27;dev/dev2/*&#x27;)</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;发布测试环境&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        container(&#x27;maven&#x27;) &#123;</span><br><span class="line">          withCredentials([</span><br><span class="line">                                                                                                  kubeconfigFile(</span><br><span class="line">                                                                                                                  credentialsId: env.KUBECONFIG_CREDENTIAL_ID,</span><br><span class="line">                                                                                                                  variable: &#x27;KUBECONFIG&#x27;)</span><br><span class="line">                                                                                                                  ]) &#123;</span><br><span class="line">                sh &#x27;envsubst &lt; dev/dev2/deployment-aggregate.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-bank.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-file.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-gateway.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-main.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-object.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-process.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-system.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-websocket.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-workflow.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-analysis.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-sign.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                        sh &#x27;envsubst &lt; dev/dev2/deployment-validator.yaml | kubectl apply -f -&#x27;</span><br><span class="line">              &#125;</span><br><span class="line"></span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line">      environment &#123;</span><br><span class="line">        DOCKER_CREDENTIAL_ID = &#x27;zhaohuanh-docker&#x27;</span><br><span class="line">        KUBECONFIG_CREDENTIAL_ID = &#x27;kubeconfig&#x27;</span><br><span class="line">        REGISTRY = &#x27;192.168.x.x:8080&#x27;</span><br><span class="line">        DOCKERHUB_NAMESPACE = &#x27;zhongzhi&#x27;</span><br><span class="line">        APP_NAME = &#x27;dev-estate&#x27;</span><br><span class="line">        BRANCH_NAME = &#x27;dev&#x27;</span><br><span class="line">        DOCKER_USERNAME = &#x27;admin&#x27;</span><br><span class="line">        DOCKER_PASSWORD = &#x27;镜像仓库密码&#x27;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>

<h4 id="8-问题："><a href="#8-问题：" class="headerlink" title="8)问题："></a>8)问题：</h4><p>私有仓库依赖下不下来（配置自己的仓库地址）</p>
<p>集群管理 -&gt; 配置 -&gt; 配置字典 -&gt; 搜索ks-devops-agent -&gt; 右边三个点 -&gt; 编辑配置 -&gt; <strong>MavenSetting -&gt; 编辑 -&gt; 把值改成自己通用的maven settings配置就好。</strong></p>
<h2 id="四、自制服务应用"><a href="#四、自制服务应用" class="headerlink" title="四、自制服务应用"></a>四、自制服务应用</h2><p>由于在代码中构建容器的配置文件是构建工作负载的yml，</p>
<p>所以只能看到工作负载中有容器，而无法通过服务关联资源和开放外网。</p>
<p>当然通过面板服务关联资源可以实现，但通过自制应用统一管理各服务应用更方便管理</p>
<blockquote>
<p>注意修改 自制应用名称name，命名空间namespace，镜像源地址images，</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br><span class="line">856</span><br><span class="line">857</span><br><span class="line">858</span><br><span class="line">859</span><br><span class="line">860</span><br><span class="line">861</span><br><span class="line">862</span><br><span class="line">863</span><br><span class="line">864</span><br><span class="line">865</span><br><span class="line">866</span><br><span class="line">867</span><br><span class="line">868</span><br><span class="line">869</span><br><span class="line">870</span><br><span class="line">871</span><br><span class="line">872</span><br><span class="line">873</span><br><span class="line">874</span><br><span class="line">875</span><br><span class="line">876</span><br><span class="line">877</span><br><span class="line">878</span><br><span class="line">879</span><br><span class="line">880</span><br><span class="line">881</span><br><span class="line">882</span><br><span class="line">883</span><br><span class="line">884</span><br><span class="line">885</span><br><span class="line">886</span><br><span class="line">887</span><br><span class="line">888</span><br><span class="line">889</span><br><span class="line">890</span><br><span class="line">891</span><br><span class="line">892</span><br><span class="line">893</span><br><span class="line">894</span><br><span class="line">895</span><br><span class="line">896</span><br><span class="line">897</span><br><span class="line">898</span><br><span class="line">899</span><br><span class="line">900</span><br><span class="line">901</span><br><span class="line">902</span><br><span class="line">903</span><br><span class="line">904</span><br><span class="line">905</span><br><span class="line">906</span><br><span class="line">907</span><br><span class="line">908</span><br><span class="line">909</span><br><span class="line">910</span><br><span class="line">911</span><br><span class="line">912</span><br><span class="line">913</span><br><span class="line">914</span><br><span class="line">915</span><br><span class="line">916</span><br><span class="line">917</span><br><span class="line">918</span><br><span class="line">919</span><br><span class="line">920</span><br><span class="line">921</span><br><span class="line">922</span><br><span class="line">923</span><br><span class="line">924</span><br><span class="line">925</span><br><span class="line">926</span><br><span class="line">927</span><br><span class="line">928</span><br><span class="line">929</span><br><span class="line">930</span><br><span class="line">931</span><br><span class="line">932</span><br><span class="line">933</span><br><span class="line">934</span><br><span class="line">935</span><br><span class="line">936</span><br><span class="line">937</span><br><span class="line">938</span><br><span class="line">939</span><br><span class="line">940</span><br><span class="line">941</span><br><span class="line">942</span><br><span class="line">943</span><br><span class="line">944</span><br><span class="line">945</span><br><span class="line">946</span><br><span class="line">947</span><br><span class="line">948</span><br><span class="line">949</span><br><span class="line">950</span><br><span class="line">951</span><br><span class="line">952</span><br><span class="line">953</span><br><span class="line">954</span><br><span class="line">955</span><br><span class="line">956</span><br><span class="line">957</span><br><span class="line">958</span><br><span class="line">959</span><br><span class="line">960</span><br><span class="line">961</span><br><span class="line">962</span><br><span class="line">963</span><br><span class="line">964</span><br><span class="line">965</span><br><span class="line">966</span><br><span class="line">967</span><br><span class="line">968</span><br><span class="line">969</span><br><span class="line">970</span><br><span class="line">971</span><br><span class="line">972</span><br><span class="line">973</span><br><span class="line">974</span><br><span class="line">975</span><br><span class="line">976</span><br><span class="line">977</span><br><span class="line">978</span><br><span class="line">979</span><br><span class="line">980</span><br><span class="line">981</span><br><span class="line">982</span><br><span class="line">983</span><br><span class="line">984</span><br><span class="line">985</span><br><span class="line">986</span><br><span class="line">987</span><br><span class="line">988</span><br><span class="line">989</span><br><span class="line">990</span><br><span class="line">991</span><br><span class="line">992</span><br><span class="line">993</span><br><span class="line">994</span><br><span class="line">995</span><br><span class="line">996</span><br><span class="line">997</span><br><span class="line">998</span><br><span class="line">999</span><br><span class="line">1000</span><br><span class="line">1001</span><br><span class="line">1002</span><br><span class="line">1003</span><br><span class="line">1004</span><br><span class="line">1005</span><br><span class="line">1006</span><br><span class="line">1007</span><br><span class="line">1008</span><br><span class="line">1009</span><br><span class="line">1010</span><br><span class="line">1011</span><br><span class="line">1012</span><br><span class="line">1013</span><br><span class="line">1014</span><br><span class="line">1015</span><br><span class="line">1016</span><br><span class="line">1017</span><br><span class="line">1018</span><br><span class="line">1019</span><br><span class="line">1020</span><br><span class="line">1021</span><br><span class="line">1022</span><br><span class="line">1023</span><br><span class="line">1024</span><br><span class="line">1025</span><br><span class="line">1026</span><br><span class="line">1027</span><br><span class="line">1028</span><br><span class="line">1029</span><br><span class="line">1030</span><br><span class="line">1031</span><br><span class="line">1032</span><br><span class="line">1033</span><br><span class="line">1034</span><br><span class="line">1035</span><br><span class="line">1036</span><br><span class="line">1037</span><br><span class="line">1038</span><br><span class="line">1039</span><br><span class="line">1040</span><br><span class="line">1041</span><br><span class="line">1042</span><br><span class="line">1043</span><br><span class="line">1044</span><br><span class="line">1045</span><br><span class="line">1046</span><br><span class="line">1047</span><br><span class="line">1048</span><br><span class="line">1049</span><br><span class="line">1050</span><br><span class="line">1051</span><br><span class="line">1052</span><br><span class="line">1053</span><br><span class="line">1054</span><br><span class="line">1055</span><br><span class="line">1056</span><br><span class="line">1057</span><br><span class="line">1058</span><br><span class="line">1059</span><br><span class="line">1060</span><br><span class="line">1061</span><br><span class="line">1062</span><br><span class="line">1063</span><br><span class="line">1064</span><br><span class="line">1065</span><br><span class="line">1066</span><br><span class="line">1067</span><br><span class="line">1068</span><br><span class="line">1069</span><br><span class="line">1070</span><br><span class="line">1071</span><br><span class="line">1072</span><br><span class="line">1073</span><br><span class="line">1074</span><br><span class="line">1075</span><br><span class="line">1076</span><br><span class="line">1077</span><br><span class="line">1078</span><br><span class="line">1079</span><br><span class="line">1080</span><br><span class="line">1081</span><br><span class="line">1082</span><br><span class="line">1083</span><br><span class="line">1084</span><br><span class="line">1085</span><br><span class="line">1086</span><br><span class="line">1087</span><br><span class="line">1088</span><br><span class="line">1089</span><br><span class="line">1090</span><br><span class="line">1091</span><br><span class="line">1092</span><br><span class="line">1093</span><br><span class="line">1094</span><br><span class="line">1095</span><br><span class="line">1096</span><br><span class="line">1097</span><br><span class="line">1098</span><br><span class="line">1099</span><br><span class="line">1100</span><br><span class="line">1101</span><br><span class="line">1102</span><br><span class="line">1103</span><br><span class="line">1104</span><br><span class="line">1105</span><br><span class="line">1106</span><br><span class="line">1107</span><br><span class="line">1108</span><br><span class="line">1109</span><br><span class="line">1110</span><br><span class="line">1111</span><br><span class="line">1112</span><br><span class="line">1113</span><br><span class="line">1114</span><br><span class="line">1115</span><br><span class="line">1116</span><br><span class="line">1117</span><br><span class="line">1118</span><br><span class="line">1119</span><br><span class="line">1120</span><br><span class="line">1121</span><br><span class="line">1122</span><br><span class="line">1123</span><br><span class="line">1124</span><br><span class="line">1125</span><br><span class="line">1126</span><br><span class="line">1127</span><br><span class="line">1128</span><br><span class="line">1129</span><br></pre></td><td class="code"><pre><span class="line">apiVersion: app.k8s.io/v1beta1</span><br><span class="line">kind: Application</span><br><span class="line">metadata:</span><br><span class="line">  name: devops-cloud-cluster</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  addOwnerRef: true</span><br><span class="line">  componentKinds:</span><br><span class="line">    - group: &#x27;&#x27;</span><br><span class="line">      kind: Service</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: Deployment</span><br><span class="line">    - group: apps</span><br><span class="line">      kind: StatefulSet</span><br><span class="line">    - group: extensions</span><br><span class="line">      kind: Ingress</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: Strategy</span><br><span class="line">    - group: servicemesh.kubesphere.io</span><br><span class="line">      kind: ServicePolicy</span><br><span class="line">---</span><br><span class="line">apiVersion: extensions/v1beta1</span><br><span class="line">kind: Ingress</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-cloud-cluster-ingress-dydnej</span><br><span class="line">spec:</span><br><span class="line">  rules: []</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-cloud-gateway</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-cloud-gateway-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-cloud-gateway</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-cloud-gateway</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-n68t1b</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-cloud-gateway:latest&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10001</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10001</span><br><span class="line">              servicePort: 10001</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">      nodeSelector:</span><br><span class="line">        kubernetes.io/hostname: node187</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-cloud-gateway</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-cloud-gateway</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-cloud-gateway</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-cloud-gateway</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10001</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10001</span><br><span class="line">      targetPort: 10001</span><br><span class="line">  type: NodePort</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-file</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-file-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-file</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-file</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-5qxqpy</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-file&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10002</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10002</span><br><span class="line">              servicePort: 10002</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-file</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-file</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-file</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-file</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10002</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10002</span><br><span class="line">      targetPort: 10002</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-system</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-system-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-system</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-system</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-bejgi2</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-system&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10003</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10003</span><br><span class="line">              servicePort: 10003</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-system</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-system</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-system</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-system</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10003</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10003</span><br><span class="line">      targetPort: 10003</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-aggregate</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-trade-aggregate-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-trade-aggregate</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-aggregate</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-v6eeyv</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-trade-aggregate&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10005</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10005</span><br><span class="line">              servicePort: 10005</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-aggregate</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-trade-aggregate</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-trade-aggregate</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-aggregate</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10005</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10005</span><br><span class="line">      targetPort: 10005</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-main</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-trade-main-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-trade-main</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-main</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-omhakh</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-trade-main&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10006</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10006</span><br><span class="line">              servicePort: 10006</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-main</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-trade-main</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-trade-main</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-main</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10006</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10006</span><br><span class="line">      targetPort: 10006</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-object</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-trade-object-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-trade-object</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-object</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-rsvqcf</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-trade-object&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10007</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10007</span><br><span class="line">              servicePort: 10007</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-object</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-trade-object</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-trade-object</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-object</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10007</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10007</span><br><span class="line">      targetPort: 10007</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-pay</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-trade-pay-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-trade-pay</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-pay</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-7xq5cc</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-trade-pay&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10008</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10008</span><br><span class="line">              servicePort: 10008</span><br><span class="line">            - name: tcp-8201</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 8201</span><br><span class="line">              servicePort: 8201</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-pay</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-trade-pay</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-trade-pay</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-pay</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10008</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10008</span><br><span class="line">      targetPort: 10008</span><br><span class="line">    - name: tcp-8201</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 8201</span><br><span class="line">      targetPort: 8201</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-process</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-trade-process-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-trade-process</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-process</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-7e9lc8</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-trade-process&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10009</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10009</span><br><span class="line">              servicePort: 10009</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-trade-process</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-trade-process</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-trade-process</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-trade-process</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10009</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10009</span><br><span class="line">      targetPort: 10009</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-websocket</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-websocket-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-websocket</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-websocket</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-1vn5nf</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-websocket&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10004</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10004</span><br><span class="line">              servicePort: 10004</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-websocket</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-websocket</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-websocket</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-websocket</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10004</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10004</span><br><span class="line">      targetPort: 10004</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-workflow-core</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-workflow-core-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-workflow-core</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-workflow-core</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-u985hw</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-workflow-core&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10010</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10010</span><br><span class="line">              servicePort: 10010</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-workflow-core</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-workflow-core</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-workflow-core</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-workflow-core</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10010</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10010</span><br><span class="line">      targetPort: 10010</span><br><span class="line">---</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-validator</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  name: devops-validator-v1</span><br><span class="line">  annotations:</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 1</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      version: v1</span><br><span class="line">      app: devops-validator</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-validator</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      annotations:</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-u985hw</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">          pullSecret: harbor</span><br><span class="line">          image: &#x27;192.168.x.x:8080/trade-dev2/devops-validator&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10014</span><br><span class="line">              protocol: TCP</span><br><span class="line">              containerPort: 10014</span><br><span class="line">              servicePort: 10014</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">              readOnly: true</span><br><span class="line">            - name: app</span><br><span class="line">              readOnly: false</span><br><span class="line">              mountPath: /app</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      initContainers: []</span><br><span class="line">      volumes:</span><br><span class="line">        - hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">          name: host-time</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">---</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Service</span><br><span class="line">metadata:</span><br><span class="line">  namespace: dev2</span><br><span class="line">  labels:</span><br><span class="line">    version: v1</span><br><span class="line">    app: devops-validator</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  annotations:</span><br><span class="line">    kubesphere.io/serviceType: statelessservice</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">  name: devops-validator</span><br><span class="line">spec:</span><br><span class="line">  sessionAffinity: None</span><br><span class="line">  selector:</span><br><span class="line">    app: devops-validator</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        version: v1</span><br><span class="line">        app: devops-validator</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">  ports:</span><br><span class="line">    - name: tcp-10014</span><br><span class="line">      protocol: TCP</span><br><span class="line">      port: 10014</span><br><span class="line">      targetPort: 10014</span><br></pre></td></tr></table></figure>



<h2 id="五、安装Harbor"><a href="#五、安装Harbor" class="headerlink" title="五、安装Harbor"></a>五、安装Harbor</h2><p>私有镜像仓库</p>
<p>安装前先安装好docker、docker-compase</p>
<blockquote>
<ol>
<li>mac和windows客户端下安装完docker之后,docker-compose是带着的</li>
<li>linux系统下,需要先安装docker,然后再安装docker-compose</li>
</ol>
</blockquote>
<p>Docker-compose安装</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">curl -L &quot;https://github.com/docker/compose/releases/download/1.28.3/docker-compose-$(uname -s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose</span><br><span class="line">chmod +x /usr/local/bin/docker-compose</span><br></pre></td></tr></table></figure>

<p>或者</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 下载docker compose</span><br><span class="line">sudo curl -L &quot;https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose</span><br><span class="line"># 添加可执行权限</span><br><span class="line">sudo chmod +x /usr/local/bin/docker-compose</span><br><span class="line"># 将文件copy到 /usr/bin/目录下</span><br><span class="line">sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose</span><br><span class="line"># 查看版本</span><br><span class="line">docker-compose --version</span><br></pre></td></tr></table></figure>

<h3 id="1、下载安装包拷贝到linux中"><a href="#1、下载安装包拷贝到linux中" class="headerlink" title="1、下载安装包拷贝到linux中"></a>1、下载安装包拷贝到linux中</h3><p>离线安装</p>
<p>离线安装包下载</p>
<p><a target="_blank" rel="noopener" href="https://github.com/goharbor/harbor/releases">https://github.com/goharbor/harbor/releases</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">cd /data/  # 切换至/data/目录下</span><br><span class="line">mkdir harbor # 创建目录harbor</span><br><span class="line"># 将下载好的harbor-offline-installer-v1.10.1.tgz解压</span><br><span class="line">tar -xcvf harbor-offline-installer-v1.10.1.tgz #解压</span><br></pre></td></tr></table></figure>

<p>在线安装</p>
<p>在线安装包下载</p>
<p><a target="_blank" rel="noopener" href="https://mirror.rancher.cn/#harbor/">https://mirror.rancher.cn/#harbor/</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">cd /data/  # 切换至/data/目录下</span><br><span class="line">mkdir harbor # 创建目录harbor</span><br><span class="line"># 将下载好的harbor-online-installer-v1.10.10.tgz解压</span><br><span class="line">tar -zxvf harbor-online-installer-v1.10.10.tgz #解压</span><br></pre></td></tr></table></figure>

<h3 id="2、修改配置文件"><a href="#2、修改配置文件" class="headerlink" title="2、修改配置文件"></a>2、修改配置文件</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim harbor.yml  </span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090418.png" alt="图片"></p>
<h3 id="3、执行安装脚本"><a href="#3、执行安装脚本" class="headerlink" title="3、执行安装脚本"></a>3、执行安装脚本</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./install.sh  # 安装</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090426.png" alt="图片"></p>
<h3 id="4、查看镜像"><a href="#4、查看镜像" class="headerlink" title="4、查看镜像"></a>4、查看镜像</h3><p>因为harbor本身自带docker 私有仓库，可以通过docker ps查看</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090432.png" alt="图片"></p>
<h3 id="5、访问harbor"><a href="#5、访问harbor" class="headerlink" title="5、访问harbor"></a>5、访问harbor</h3><p>ip+端口</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090438.png" alt="image-20220426140408316"></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#启动harbor</span><br><span class="line">docker-compose start</span><br><span class="line">#停止harbor</span><br><span class="line">docker-compose stop</span><br></pre></td></tr></table></figure>


      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>


<script src="/qingfeng-blog/js/vdonate.js"></script>

<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150832.png',
  alipayImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150823.png'
});
</script>
      
      
      <div>
        <ul class="post-copyright">
          <li class="post-copyright-author">
          <strong>Post author:  </strong>清峰</a>
          </li>
          <li class="post-copyright-link">
          <strong>Post link:  </strong>
          <a href="/qingfeng-blog/2022/04/20/运维安装/Linux kubesphere在线全流程搭建/" target="_blank" title="Linux kubesphere在线全流程搭建">http://example.com/2022/04/20/运维安装/Linux kubesphere在线全流程搭建/</a>
          </li>
          <li class="post-copyright-license">
            <strong>Copyright Notice:   </strong>
            All articles in this blog are licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
            unless stating additionally.
          </li>
         
        </ul>
<div>

      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTQ4MS82MDQ5">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
        
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/qingfeng-blog/tags/k8s/" rel="tag">k8s</a></li></ul>

      

    </footer>
  </div>
</div>
  
    
<nav id="article-nav">
  
    <a href="/qingfeng-blog/2022/05/26/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20k8s%E5%9C%A8%E7%BA%BF%EF%BD%9C%E7%A6%BB%E7%BA%BF%E9%83%A8%E7%BD%B2/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Linux k8s在线｜离线部署
        
      </div>
    </a>
  
  
    <a href="/qingfeng-blog/2022/03/09/Mysql/Mysql5.7%E5%8D%87%E7%BA%A7%E5%B0%8F%E7%89%88%E6%9C%AC/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Mysql5.7升级小版本</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
        <ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81Docker%E5%AE%89%E8%A3%85"><span class="nav-number">1.</span> <span class="nav-text">一、Docker安装</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E7%A7%BB%E9%99%A4%E4%BB%A5%E5%89%8Ddocker%E7%9B%B8%E5%85%B3%E5%8C%85"><span class="nav-number">1.1.</span> <span class="nav-text">一、移除以前docker相关包</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E9%85%8D%E7%BD%AE%E7%9B%B8%E5%85%B3yum%E6%BA%90"><span class="nav-number">1.2.</span> <span class="nav-text">二、配置相关yum源</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E5%AE%89%E8%A3%85docker"><span class="nav-number">1.3.</span> <span class="nav-text">三、安装docker</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E5%90%AF%E5%8A%A8docker"><span class="nav-number">1.4.</span> <span class="nav-text">四、启动docker</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E9%85%8D%E7%BD%AE%E5%8A%A0%E9%80%9F"><span class="nav-number">1.5.</span> <span class="nav-text">五、配置加速</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81kubesphere%E5%8F%8Ak8s%E5%AE%89%E8%A3%85"><span class="nav-number">2.</span> <span class="nav-text">二、kubesphere及k8s安装</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E9%80%9A%E8%BF%87KubeKey%E5%AE%89%E8%A3%85%E5%B7%A5%E5%85%B7%E5%AE%89%E8%A3%85"><span class="nav-number">2.1.</span> <span class="nav-text">一、通过KubeKey安装工具安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%9C%A8%E7%BA%BF%E5%AE%89%E8%A3%85%EF%BC%9A"><span class="nav-number">2.2.</span> <span class="nav-text">二、在线安装：</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E6%B5%81%E6%B0%B4%E7%BA%BF%E6%90%AD%E5%BB%BA"><span class="nav-number">3.</span> <span class="nav-text">三、流水线搭建</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87"><span class="nav-number">3.1.</span> <span class="nav-text">一、前期准备</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E5%88%9B%E5%BB%BA%E4%BC%81%E4%B8%9A%E7%A9%BA%E9%97%B4"><span class="nav-number">3.1.0.1.</span> <span class="nav-text">1、创建企业空间</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86"><span class="nav-number">3.1.0.2.</span> <span class="nav-text">2、创建项目管理</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E4%B8%AD%E9%85%8D%E7%BD%AE%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%AF%86%E9%92%A5"><span class="nav-number">3.1.0.3.</span> <span class="nav-text">3、项目管理中配置镜像仓库密钥</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%E3%80%81%E5%AE%89%E8%A3%85%E5%A5%BD%E7%9B%B8%E5%85%B3%E7%8E%AF%E5%A2%83"><span class="nav-number">3.1.0.4.</span> <span class="nav-text">4、安装好相关环境</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81nacos%E9%83%A8%E7%BD%B2"><span class="nav-number">3.1.1.</span> <span class="nav-text">1、nacos部署</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%EF%BC%89%E7%9B%B8%E5%85%B3%E6%95%B0%E6%8D%AE%E5%BA%93%E9%85%8D%E7%BD%AE"><span class="nav-number">3.1.1.1.</span> <span class="nav-text">1）相关数据库配置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E8%87%AA%E5%88%B6%E5%BA%94%E7%94%A8%E5%88%9B%E5%BB%BAnacos%EF%BC%88yml%E5%BD%A2%E5%BC%8F%EF%BC%89"><span class="nav-number">3.1.1.2.</span> <span class="nav-text">2、自制应用创建nacos（yml形式）</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81xxl-job%E9%83%A8%E7%BD%B2"><span class="nav-number">3.1.2.</span> <span class="nav-text">二、xxl-job部署</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%EF%BC%89%E6%96%B0%E5%BB%BAxxl-job%E6%95%B0%E6%8D%AE%E5%BA%93"><span class="nav-number">3.1.2.1.</span> <span class="nav-text">1）新建xxl-job数据库</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%EF%BC%89%E8%87%AA%E5%88%B6%E5%BA%94%E7%94%A8%E5%88%9B%E5%BB%BAxxl-job"><span class="nav-number">3.1.2.2.</span> <span class="nav-text">2）自制应用创建xxl-job</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81redis%E9%83%A8%E7%BD%B2"><span class="nav-number">3.1.3.</span> <span class="nav-text">三、redis部署</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%EF%BC%89%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E5%88%9B%E5%BB%BA%E9%85%8D%E7%BD%AE"><span class="nav-number">3.1.3.1.</span> <span class="nav-text">1）配置中心创建配置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%EF%BC%89%E5%88%9B%E5%BB%BA%E5%AD%98%E5%82%A8%E5%8D%B7"><span class="nav-number">3.1.3.2.</span> <span class="nav-text">2）创建存储卷</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%EF%BC%89%E5%88%9B%E5%BB%BA%E5%AE%B9%E5%99%A8"><span class="nav-number">3.1.3.3.</span> <span class="nav-text">3）创建容器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%EF%BC%89%E6%B7%BB%E5%8A%A0%E5%AD%98%E5%82%A8%E5%8D%B7"><span class="nav-number">3.1.3.4.</span> <span class="nav-text">4）添加存储卷</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5%EF%BC%89%E6%8C%82%E8%BD%BD%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">3.1.3.5.</span> <span class="nav-text">5）挂载配置文件</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E9%A1%B9%E7%9B%AE%E4%BB%A3%E7%A0%81%E9%85%8D%E7%BD%AE"><span class="nav-number">3.2.</span> <span class="nav-text">二、项目代码配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81pom%E6%96%87%E4%BB%B6"><span class="nav-number">3.2.1.</span> <span class="nav-text">一、pom文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E9%85%8D%E7%BD%AEDockerfile%E6%9E%84%E5%BB%BA%E6%9E%84%E5%BB%BA%E6%96%87%E4%BB%B6%EF%BC%88%E6%AF%8F%E4%B8%AA%E6%9C%8D%E5%8A%A1%E9%83%BD%E8%A6%81%EF%BC%89"><span class="nav-number">3.2.2.</span> <span class="nav-text">二、配置Dockerfile构建构建文件（每个服务都要）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E9%A1%B9%E7%9B%AE%E4%B8%AD%E6%B5%81%E6%B0%B4%E7%BA%BF%E6%9E%84%E5%BB%BADeployment%E5%AE%B9%E5%99%A8%E6%89%80%E9%9C%80%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%EF%BC%88%E6%AF%8F%E4%B8%AA%E6%9C%8D%E5%8A%A1%E9%83%BD%E8%A6%81%EF%BC%89"><span class="nav-number">3.2.3.</span> <span class="nav-text">三、项目中流水线构建Deployment容器所需的配置文件（每个服务都要）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E6%8B%89%E9%80%9A%E6%B5%81%E6%B0%B4%E7%BA%BF"><span class="nav-number">3.3.</span> <span class="nav-text">三、拉通流水线</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%88%9B%E5%BB%BA%E6%B5%81%E6%B0%B4%E7%BA%BF%E5%B7%A5%E7%A8%8B-devops-cloud-auto"><span class="nav-number">3.3.1.</span> <span class="nav-text">一、创建流水线工程 devops-cloud-auto</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%88%9B%E5%BB%BA%E6%89%80%E9%9C%80%E5%87%AD%E8%AF%81"><span class="nav-number">3.3.2.</span> <span class="nav-text">二、创建所需凭证</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E6%96%B0%E5%BB%BA%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%87%AD%E8%AF%81"><span class="nav-number">3.3.2.1.</span> <span class="nav-text">1、新建镜像仓库凭证</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E6%96%B0%E5%BB%BAkubeconfig"><span class="nav-number">3.3.2.2.</span> <span class="nav-text">2、新建kubeconfig</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E5%88%9B%E5%BB%BA%E6%B5%81%E6%B0%B4%E7%BA%BF"><span class="nav-number">3.3.3.</span> <span class="nav-text">三、创建流水线</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E4%BB%A3%E7%90%86%E7%8E%AF%E5%A2%83-maven"><span class="nav-number">3.3.3.1.</span> <span class="nav-text">1)代理环境 maven</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%EF%BC%89%E4%BB%A3%E7%A0%81%E6%A3%80%E5%87%BA"><span class="nav-number">3.3.3.2.</span> <span class="nav-text">2）代码检出</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%EF%BC%89%E9%9B%86%E6%88%90%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83%E5%88%B6%E5%93%81%E6%9E%84%E5%BB%BA"><span class="nav-number">3.3.3.3.</span> <span class="nav-text">3）集成测试环境制品构建</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%EF%BC%89%E6%B8%85%E7%90%86%E9%83%A8%E7%BD%B2"><span class="nav-number">3.3.3.4.</span> <span class="nav-text">4）清理部署</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5%EF%BC%89%E5%8F%91%E5%B8%83%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83"><span class="nav-number">3.3.3.5.</span> <span class="nav-text">5）发布测试环境</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#6%EF%BC%89%E8%BF%90%E8%A1%8C%E9%83%A8%E7%BD%B2"><span class="nav-number">3.3.3.6.</span> <span class="nav-text">6）运行部署</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#7%EF%BC%89%EF%BC%88%E5%8F%AF%E9%80%89%EF%BC%89%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E5%BD%A2%E5%BC%8F%E6%9E%84%E5%BB%BA%E6%B5%81%E6%B0%B4%E7%BA%BF"><span class="nav-number">3.3.3.7.</span> <span class="nav-text">7）（可选）使用配置文件形式构建流水线</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#8-%E9%97%AE%E9%A2%98%EF%BC%9A"><span class="nav-number">3.3.3.8.</span> <span class="nav-text">8)问题：</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E8%87%AA%E5%88%B6%E6%9C%8D%E5%8A%A1%E5%BA%94%E7%94%A8"><span class="nav-number">3.4.</span> <span class="nav-text">四、自制服务应用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E5%AE%89%E8%A3%85Harbor"><span class="nav-number">3.5.</span> <span class="nav-text">五、安装Harbor</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E5%8C%85%E6%8B%B7%E8%B4%9D%E5%88%B0linux%E4%B8%AD"><span class="nav-number">3.5.1.</span> <span class="nav-text">1、下载安装包拷贝到linux中</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">3.5.2.</span> <span class="nav-text">2、修改配置文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3%E3%80%81%E6%89%A7%E8%A1%8C%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC"><span class="nav-number">3.5.3.</span> <span class="nav-text">3、执行安装脚本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4%E3%80%81%E6%9F%A5%E7%9C%8B%E9%95%9C%E5%83%8F"><span class="nav-number">3.5.4.</span> <span class="nav-text">4、查看镜像</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5%E3%80%81%E8%AE%BF%E9%97%AEharbor"><span class="nav-number">3.5.5.</span> <span class="nav-text">5、访问harbor</span></a></li></ol></li></ol></li></ol>
    
    </div>
  </aside>


</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <!-- <p> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/iTimeTraveler/hexo-theme-hiker" target="_blank">Hexo-theme-hiker</a> </p> -->
	      <p>May there be no bug in the world！</p>
        <p id="copyRightEn">Copyright &copy; 2022 - 2023 All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				UV : <span id="busuanzi_value_site_uv"></span> |  
				PV : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/qingfeng-blog/" class="mobile-nav-link">首页</a>
  
    <a href="/qingfeng-blog/categories" class="mobile-nav-link">分类</a>
  
    <a href="/qingfeng-blog/tags" class="mobile-nav-link">标签</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  
<link rel="stylesheet" href="/qingfeng-blog/fancybox/jquery.fancybox.css">

  
<script src="/qingfeng-blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/qingfeng-blog/js/scripts.js"></script>



  
<script src="/qingfeng-blog/js/home.js"></script>




  
<script src="/qingfeng-blog/js/dialog.js"></script>









	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            清峰小栈
          </div>
          <div class="panel-body">
            Copyright © 2023 清峰 All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/qingfeng-blog/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>